#ifndef CNARRFIELD_H_
#define CNARRFIELD_H_

#include "rectype.h"
#include <vector>
#include <string>

using namespace std;

namespace opsrc {
	namespace stdf {
	
	//	template <typename T, int L = -1, template <typename> class CONT = std::vector >
		template <typename T, int L = -1, template <typename A, typename = std::allocator<A> > class CONT=std::vector >
		class CnArrField
		{
		public:
			CnArrField();
			CnArrField(char *p, endian e, int elcount);
			virtual ~CnArrField();
			
			void decode(char* buf, int elemcount);
			int getByteCount() const; 
			const CONT<T> getData() const;	
			string arrayToString();
			
			int getCount() const;	
			
			int getTotalByteCount() const;		
			
		private:
			CONT<T> cont;
			int blen;
			endian en;			
		};

	}	// namespace stdf
}	// namespace opsrc

#endif /*CNARRFIELD_H_*/
